import createAxios from '/@/utils/axios'
import { useAiConfig } from '/@/stores/aiConfig'
import { useChatConfig } from "/@/stores/openai/chatConfig";

export const apiUrl = '/api/ai.web';

export function webConfig() {
    const aiConfig = useAiConfig()
    createAxios({
        url: apiUrl + '/index',
        method: 'get',
        params: {},
    }).then((res) => {
        aiConfig.dataFill(res.data)
    })
}

export function chatConfig() {
    const chatConfig = useChatConfig()
    createAxios({
        url: apiUrl + '/chat_config',
        method: 'get',
        params: {}
    }).then((res) => {
        chatConfig.dataFill(res.data)
    })
}
